package cn.com.checne.util;

import java.util.List;

import org.springframework.ui.ModelMap;

import cn.com.checne.dao.BusinessCategoryDao;
import cn.com.checne.dao.CultureCategoryDao;
import cn.com.checne.dao.IntroduceCategoryDao;
import cn.com.checne.dao.JobCategoryDao;
import cn.com.checne.dao.NewsCategoryDao;
import cn.com.checne.dao.PerformanceCategoryDao;
import cn.com.checne.dao.PostCategoryDao;
import cn.com.checne.model.domain.BusinessCategory;
import cn.com.checne.model.domain.CultureCategory;
import cn.com.checne.model.domain.IntroduceCategory;
import cn.com.checne.model.domain.JobCategory;
import cn.com.checne.model.domain.NewsCategory;
import cn.com.checne.model.domain.PerformanceCategory;
import cn.com.checne.model.domain.PostCategory;

public class HeaderUtils {
	
	public static ModelMap getHeaderMap(int languageId){
		List<IntroduceCategory> introduceHeaderList = new IntroduceCategoryDao().getAll(languageId);
		List<BusinessCategory> businessHeaderList = new BusinessCategoryDao().getAll(languageId);
		List<PerformanceCategory> performanceHeaderList = new PerformanceCategoryDao().getAll(languageId);
		List<NewsCategory> newsHeaderList = new NewsCategoryDao().getAll(languageId);
		List<CultureCategory> cultureHeaderList = new CultureCategoryDao().getAll(languageId);
		List<JobCategory> jobHeaderList = new JobCategoryDao().getAll(languageId,-1);
		List<PostCategory> postHeaderList = new PostCategoryDao().getAll(languageId);

		
		
		ModelMap mm = new ModelMap();
		mm.put("introduceHeaderList", introduceHeaderList);
		mm.put("businessHeaderList",businessHeaderList );
		mm.put("performanceHeaderList", performanceHeaderList);
		mm.put("newsHeaderList",newsHeaderList );
		mm.put("cultureHeaderList",cultureHeaderList );
		mm.put("jobHeaderList", jobHeaderList);
		mm.put("postHeaderList", postHeaderList);
		
		
		return mm ;
	}
}
